import { request } from '../utils/request';
import { apiVirtualSuccessAccess, useVirtualAccess } from '@/utils/tools';

export async function queryListData(params) {
  if (useVirtualAccess()) {
    const result = await apiVirtualSuccessAccess({
      params,
      data: [
        { flag: 0, name: '暂未支付' },
        { flag: 1, name: '微信支付' },
        { flag: 2, name: '支付宝支付' },
        { flag: 3, name: '银联支付' },
        { flag: 4, name: '到店支付' },
        { flag: 5, name: '微信扫码' },
        { flag: 6, name: '余额支付' },
      ],
    });

    return result;
  }

  return request('/UserOrder/GetUserOrderPayType', {
    method: 'POST',
    body: params,
  });
}

/**
 * 占位函数
 *
 * @export
 * @returns
 */
export async function empty() {
  return {};
}
